Integrand size = 14, antiderivative size = 12 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=-b \text {arctanh}(\cos (x))-a \csc (x) \]
[Out]
Time = 0.04 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3168, 3855, 2686, 8} \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=-a \csc (x)-b \text {arctanh}(\cos (x)) \]
[In]
[Out]
Rule 8
Rule 2686
Rule 3168
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \int (b \csc (x)+a \cot (x) \csc (x)) \, dx \\ & = a \int \cot (x) \csc (x) \, dx+b \int \csc (x) \, dx \\ & = -b \text {arctanh}(\cos (x))-a \text {Subst}(\int 1 \, dx,x,\csc (x)) \\ & = -b \text {arctanh}(\cos (x))-a \csc (x) \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(25\) vs. \(2(12)=24\).
Time = 0.05 (sec) , antiderivative size = 25, normalized size of antiderivative = 2.08 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=-a \csc (x)-b \log \left (\cos \left (\frac {x}{2}\right )\right )+b \log \left (\sin \left (\frac {x}{2}\right )\right ) \]
[In]
[Out]
Time = 0.41 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.42
method | result | size |
parallelrisch | \(b \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )-a \csc \left (x \right )\) | \(17\) |
parts | \(b \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )-a \csc \left (x \right )\) | \(17\) |
default | \(-\frac {a}{\sin \left (x \right )}+b \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )\) | \(19\) |
risch | \(-\frac {2 i a \,{\mathrm e}^{i x}}{{\mathrm e}^{2 i x}-1}-b \ln \left ({\mathrm e}^{i x}+1\right )+b \ln \left ({\mathrm e}^{i x}-1\right )\) | \(41\) |
norman | \(\frac {-\frac {a}{2}-\frac {a \tan \left (\frac {x}{2}\right )^{4}}{2}-\tan \left (\frac {x}{2}\right )^{2} a}{\tan \left (\frac {x}{2}\right ) \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )}+b \ln \left (\tan \left (\frac {x}{2}\right )\right )\) | \(48\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (12) = 24\).
Time = 0.25 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.75 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=-\frac {b \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) - b \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \sin \left (x\right ) + 2 \, a}{2 \, \sin \left (x\right )} \]
[In]
[Out]
Time = 0.95 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=- \frac {a}{\sin {\left (x \right )}} + \frac {b \log {\left (\cos {\left (x \right )} - 1 \right )}}{2} - \frac {b \log {\left (\cos {\left (x \right )} + 1 \right )}}{2} \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=-\frac {1}{2} \, b {\left (\log \left (\cos \left (x\right ) + 1\right ) - \log \left (\cos \left (x\right ) - 1\right )\right )} - \frac {a}{\sin \left (x\right )} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (12) = 24\).
Time = 0.28 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.75 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=b \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) - \frac {1}{2} \, a \tan \left (\frac {1}{2} \, x\right ) - \frac {2 \, b \tan \left (\frac {1}{2} \, x\right ) + a}{2 \, \tan \left (\frac {1}{2} \, x\right )} \]
[In]
[Out]
Time = 20.68 (sec) , antiderivative size = 24, normalized size of antiderivative = 2.00 \[ \int \csc ^2(x) (a \cos (x)+b \sin (x)) \, dx=b\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )-\frac {a}{2\,\mathrm {tan}\left (\frac {x}{2}\right )}-\frac {a\,\mathrm {tan}\left (\frac {x}{2}\right )}{2} \]
[In]
[Out]